3.12.39 \(\int \sqrt {a+a x} \sqrt {c-c x} \, dx\) [1139]

Optimal. Leaf size=67 \[ \frac {1}{2} x \sqrt {a+a x} \sqrt {c-c x}+\sqrt {a} \sqrt {c} \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {a+a x}}{\sqrt {a} \sqrt {c-c x}}\right ) \]

[Out]

arctan(c^(1/2)*(a*x+a)^(1/2)/a^(1/2)/(-c*x+c)^(1/2))*a^(1/2)*c^(1/2)+1/2*x*(a*x+a)^(1/2)*(-c*x+c)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {38, 65, 223, 209} \begin {gather*} \frac {1}{2} x \sqrt {a x+a} \sqrt {c-c x}+\sqrt {a} \sqrt {c} \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {a x+a}}{\sqrt {a} \sqrt {c-c x}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + a*x]*Sqrt[c - c*x],x]

[Out]

(x*Sqrt[a + a*x]*Sqrt[c - c*x])/2 + Sqrt[a]*Sqrt[c]*ArcTan[(Sqrt[c]*Sqrt[a + a*x])/(Sqrt[a]*Sqrt[c - c*x])]

Rule 38

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[x*(a + b*x)^m*((c + d*x)^m/(2*m + 1))
, x] + Dist[2*a*c*(m/(2*m + 1)), Int[(a + b*x)^(m - 1)*(c + d*x)^(m - 1), x], x] /; FreeQ[{a, b, c, d}, x] &&
EqQ[b*c + a*d, 0] && IGtQ[m + 1/2, 0]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rubi steps

\begin {align*} \int \sqrt {a+a x} \sqrt {c-c x} \, dx &=\frac {1}{2} x \sqrt {a+a x} \sqrt {c-c x}+\frac {1}{2} (a c) \int \frac {1}{\sqrt {a+a x} \sqrt {c-c x}} \, dx\\ &=\frac {1}{2} x \sqrt {a+a x} \sqrt {c-c x}+c \text {Subst}\left (\int \frac {1}{\sqrt {2 c-\frac {c x^2}{a}}} \, dx,x,\sqrt {a+a x}\right )\\ &=\frac {1}{2} x \sqrt {a+a x} \sqrt {c-c x}+c \text {Subst}\left (\int \frac {1}{1+\frac {c x^2}{a}} \, dx,x,\frac {\sqrt {a+a x}}{\sqrt {c-c x}}\right )\\ &=\frac {1}{2} x \sqrt {a+a x} \sqrt {c-c x}+\sqrt {a} \sqrt {c} \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {a+a x}}{\sqrt {a} \sqrt {c-c x}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.16, size = 69, normalized size = 1.03 \begin {gather*} \frac {1}{2} \sqrt {c} \sqrt {a (1+x)} \left (\frac {x \sqrt {c-c x}}{\sqrt {c}}+\frac {2 \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {1+x}}{\sqrt {c-c x}}\right )}{\sqrt {1+x}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + a*x]*Sqrt[c - c*x],x]

[Out]

(Sqrt[c]*Sqrt[a*(1 + x)]*((x*Sqrt[c - c*x])/Sqrt[c] + (2*ArcTan[(Sqrt[c]*Sqrt[1 + x])/Sqrt[c - c*x]])/Sqrt[1 +
 x]))/2

________________________________________________________________________________________

Mathics [F(-1)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

mathics('Integrate[(a + a*x)^(1/2)*(c - c*x)^(1/2),x]')

[Out]

Timed out

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(101\) vs. \(2(49)=98\).
time = 0.14, size = 102, normalized size = 1.52

method result size
risch \(-\frac {x \left (1+x \right ) \left (-1+x \right ) a c}{2 \sqrt {a \left (1+x \right )}\, \sqrt {-c \left (-1+x \right )}}+\frac {\arctan \left (\frac {\sqrt {a c}\, x}{\sqrt {-a c \,x^{2}+a c}}\right ) a c \sqrt {-a \left (1+x \right ) c \left (-1+x \right )}}{2 \sqrt {a c}\, \sqrt {a \left (1+x \right )}\, \sqrt {-c \left (-1+x \right )}}\) \(85\)
default \(-\frac {\sqrt {a x +a}\, \left (-c x +c \right )^{\frac {3}{2}}}{2 c}+\frac {a \left (\frac {\sqrt {-c x +c}\, \sqrt {a x +a}}{a}+\frac {c \sqrt {\left (-c x +c \right ) \left (a x +a \right )}\, \arctan \left (\frac {\sqrt {a c}\, x}{\sqrt {-a c \,x^{2}+a c}}\right )}{\sqrt {-c x +c}\, \sqrt {a x +a}\, \sqrt {a c}}\right )}{2}\) \(102\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*x+a)^(1/2)*(-c*x+c)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/2/c*(a*x+a)^(1/2)*(-c*x+c)^(3/2)+1/2*a*(1/a*(-c*x+c)^(1/2)*(a*x+a)^(1/2)+c*((-c*x+c)*(a*x+a))^(1/2)/(-c*x+c
)^(1/2)/(a*x+a)^(1/2)/(a*c)^(1/2)*arctan((a*c)^(1/2)*x/(-a*c*x^2+a*c)^(1/2)))

________________________________________________________________________________________

Maxima [A]
time = 0.36, size = 28, normalized size = 0.42 \begin {gather*} \frac {a c \arcsin \left (x\right )}{2 \, \sqrt {a c}} + \frac {1}{2} \, \sqrt {-a c x^{2} + a c} x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+a)^(1/2)*(-c*x+c)^(1/2),x, algorithm="maxima")

[Out]

1/2*a*c*arcsin(x)/sqrt(a*c) + 1/2*sqrt(-a*c*x^2 + a*c)*x

________________________________________________________________________________________

Fricas [A]
time = 0.31, size = 127, normalized size = 1.90 \begin {gather*} \left [\frac {1}{2} \, \sqrt {a x + a} \sqrt {-c x + c} x + \frac {1}{4} \, \sqrt {-a c} \log \left (2 \, a c x^{2} + 2 \, \sqrt {-a c} \sqrt {a x + a} \sqrt {-c x + c} x - a c\right ), \frac {1}{2} \, \sqrt {a x + a} \sqrt {-c x + c} x - \frac {1}{2} \, \sqrt {a c} \arctan \left (\frac {\sqrt {a c} \sqrt {a x + a} \sqrt {-c x + c} x}{a c x^{2} - a c}\right )\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+a)^(1/2)*(-c*x+c)^(1/2),x, algorithm="fricas")

[Out]

[1/2*sqrt(a*x + a)*sqrt(-c*x + c)*x + 1/4*sqrt(-a*c)*log(2*a*c*x^2 + 2*sqrt(-a*c)*sqrt(a*x + a)*sqrt(-c*x + c)
*x - a*c), 1/2*sqrt(a*x + a)*sqrt(-c*x + c)*x - 1/2*sqrt(a*c)*arctan(sqrt(a*c)*sqrt(a*x + a)*sqrt(-c*x + c)*x/
(a*c*x^2 - a*c))]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \left (x + 1\right )} \sqrt {- c \left (x - 1\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+a)**(1/2)*(-c*x+c)**(1/2),x)

[Out]

Integral(sqrt(a*(x + 1))*sqrt(-c*(x - 1)), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 173 vs. \(2 (49) = 98\).
time = 0.02, size = 231, normalized size = 3.45 \begin {gather*} \frac {2 \left |a\right | \left (2 \left (\frac {1}{8} \sqrt {a x+a} \sqrt {a x+a}-\frac {12}{32} a\right ) \sqrt {a x+a} \sqrt {2 a^{2} c-a c \left (a x+a\right )}+\frac {2 a^{3} c \ln \left |\sqrt {2 a^{2} c-a c \left (a x+a\right )}-\sqrt {-a c} \sqrt {a x+a}\right |}{4 \sqrt {-a c}}\right )}{a^{2} a}+\frac {2 \left |a\right | \left (\frac {1}{2} \sqrt {a x+a} \sqrt {2 a^{2} c-a c \left (a x+a\right )}-\frac {2 a^{2} c \ln \left |\sqrt {2 a^{2} c-a c \left (a x+a\right )}-\sqrt {-a c} \sqrt {a x+a}\right |}{2 \sqrt {-a c}}\right )}{a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+a)^(1/2)*(-c*x+c)^(1/2),x)

[Out]

-(2*a^2*c*log(abs(-sqrt(-a*c)*sqrt(a*x + a) + sqrt(-(a*x + a)*a*c + 2*a^2*c)))/sqrt(-a*c) - sqrt(-(a*x + a)*a*
c + 2*a^2*c)*sqrt(a*x + a))*abs(a)/a^2 + 1/2*(2*a^3*c*log(abs(-sqrt(-a*c)*sqrt(a*x + a) + sqrt(-(a*x + a)*a*c
+ 2*a^2*c)))/sqrt(-a*c) + sqrt(-(a*x + a)*a*c + 2*a^2*c)*sqrt(a*x + a)*(a*x - 2*a))*abs(a)/a^3

________________________________________________________________________________________

Mupad [B]
time = 0.30, size = 59, normalized size = 0.88 \begin {gather*} \frac {x\,\sqrt {a+a\,x}\,\sqrt {c-c\,x}}{2}-\frac {\sqrt {a}\,\sqrt {-c}\,\ln \left (\sqrt {-c}\,\sqrt {a\,\left (x+1\right )}\,\sqrt {-c\,\left (x-1\right )}-\sqrt {a}\,c\,x\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*x)^(1/2)*(c - c*x)^(1/2),x)

[Out]

(x*(a + a*x)^(1/2)*(c - c*x)^(1/2))/2 - (a^(1/2)*(-c)^(1/2)*log((-c)^(1/2)*(a*(x + 1))^(1/2)*(-c*(x - 1))^(1/2
) - a^(1/2)*c*x))/2

________________________________________________________________________________________